package com.neymar.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.neymar.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author neymar
 * @since 2021-06-02
 */
public interface UserMapper extends BaseMapper<User> {

    @Select(
            "select a.user_id,a.user_name,b.* from information.user a join information.applicant b\n" +
                    "where a.user_id=b.user_id limit ${(current-1)*size},${size}"
    )
    List<Map<String, String>> findAllUsersDetails(@Param("current") Integer current, @Param("size") Integer size);
}
